VERSION=1.05
FILES=corset.cc Cluster.cc Transcript.cc MakeClusters.cc Read.cc MakeClusters.h Transcript.h Read.h StringSet.h Cluster.h corset_fasta_ID_changer.cc
OBJ=corset.o Cluster.o MakeClusters.o Transcript.o Read.o
EX=corset corset_fasta_ID_changer

all: $(EX) Makefile

corset: $(OBJ)
	@CXX@ @CXXFLAGS@ $(OBJ) -o $@ @LDFLAGS@ @LIBS@

%.o: %.cc
	@CXX@ @CXXFLAGS@ -c $< -o $@ -DVERSION=$(VERSION)

corset_fasta_ID_changer: corset_fasta_ID_changer.cc
	g++ $< -o $@

clean:                                                     
	-rm *~ $(OBJ)

Clean: clean
	-rm $(EX)

install: all
	test -d @prefix@/bin/ || mkdir @prefix@/bin/
	cp $(EX) @prefix@/bin/

tar_ball:
	-mkdir corset-$(VERSION)
	cp $(FILES) corset-$(VERSION)
	cp Makefile.in README configure COPYING LICENSE corset-$(VERSION)
	tar -cvf corset-$(VERSION).tar corset-$(VERSION)/
	gzip corset-$(VERSION).tar

tar_ball_binary:
	-mkdir corset-$(VERSION)-linux64
	cp $(EX) corset-$(VERSION)-linux64
	cp COPYING LICENSE corset-$(VERSION)-linux64
	tar -cvf corset-$(VERSION)-linux64.tar corset-$(VERSION)-linux64/
	gzip corset-$(VERSION)-linux64.tar
